package com.eastchina.fids2focs.common.exception;

import javax.xml.namespace.QName;

import org.codehaus.xfire.fault.FaultInfoException;

import com.eastchina.fids2focs.common.FIDSIIError;
import com.eastchina.fids2focs.common.FIDSIIErrors;

public class FIDSIIValidateException extends FaultInfoException {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -5037419619031135899L;

	private FIDSIIErrors faultErrors;
	
	public FIDSIIValidateException(FIDSIIError error) {
		super();
		faultErrors = new FIDSIIErrors();
		faultErrors.addError(error);
	}	
	public FIDSIIValidateException(FIDSIIErrors errors) {
		super();
		faultErrors = errors;		
	}
	
	public FIDSIIValidateException(String message, FIDSIIError error) {
		super(message);
		faultErrors = new FIDSIIErrors();
		faultErrors.addError(error);
	}
	public FIDSIIValidateException(String message, FIDSIIErrors errors) {
		super(message);
		faultErrors = errors;	
	}
	public FIDSIIErrors getFaultInfo() {
		return faultErrors;
	}
	
	public static QName getFaultName() {
		return new QName("http://common.fids2focs.eastchina.com", "FIDSIIErrors", "np");
	}
	
}
